<template>
  <div class="homeFour">
    <div class="head">
      <!-- 标题 -->
      <h3>新鲜好物 <span>新鲜出炉&emsp;品质靠谱</span></h3>
      <span class="all">查看全部></span>
    </div>
    <div class="w">
      <ul>
        <li v-for="item in specialData" :key="item.ic">
          <div class="meta">
            <img :src="item.cover" alt="" />
            <div class="bottom">
              <p>{{ item.title }}</p>
              <span>{{ item.summary }}</span>
            </div>
            <div class="btn">￥{{ item.lowestPrice }}</div>
          </div>
          <div class="foot">
            <span
              ><i class="iconfont icon-hart1"></i> {{ item.collectNum }}</span
            >
            <span><i class="iconfont icon-see"></i>{{ item.viewNum }}</span>
            <span
              ><i class="iconfont icon-message"></i>{{ item.replyNum }}</span
            >
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: ["specialData"],
};
</script>

<style lang="scss" scoped>
@import "@/assets/css/hoverShadow.scss";
.head {
  width: 100%;
  height: 115px;
  display: flex;
  align-items: center;
}

h3 {
  flex: 1;
  font-size: 32px;
  font-weight: 400;
  margin-left: 6px;
  height: 35px;
  line-height: 35px;
  span {
    font-size: 16px;
    color: #999;
    margin-left: 20px;
    vertical-align: middle;
  }
}
.all {
  margin-right: 4px;
  color: #999;
}
.all:hover {
  color: #27ba9b;
  cursor: pointer;
}
.w {
  height: 380px;
  padding-bottom: 20px;
  ul {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between !important;
    li {
      &:hover {
        @include hoverShadow;
      }
      width: 404px;
      height: 100%;
      background-color: white;
      .meta {
        width: 404px;
        height: 288px;
        position: relative;
        img {
          width: 100%;
          height: 100%;
          background-color: #27ba9b;
        }
        .bottom {
          width: 100%;
          height: 70px;
          position: absolute;
          bottom: 0;
          left: 0;
          //   background-color: pink;
          padding-left: 16px;
          p {
            width: 300px;
            color: #fff;
            font-size: 22px;
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          span {
            display: block;
            font-size: 19px;
            color: #999;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 300px;
          }
        }
        .btn {
          line-height: 1;
          padding: 4px 8px 4px 7px;
          color: #cf4444;
          font-size: 17px;
          background-color: #fff;
          border-radius: 2px;
          position: absolute;
          right: 20px;
          bottom: 28px;
        }
      }
      .foot {
        width: 100%;
        height: 72px;
        padding: 0 20px;
        span {
          float: left;
          margin-right: 25px;
          vertical-align: middle;
          line-height: 72px;
          &:last-child {
            float: right;
          }
        }
      }
    }
  }
}
</style>
